3.963 \(\int \frac{(a+b x)^n (c+d x)^{-n}}{x^2} \, dx\)

Optimal. Leaf size=62 \[ \frac{(b c-a d) (a+b x)^{n+1} (c+d x)^{-n-1} \, _2F_1\left (2,n+1;n+2;\frac{c (a+b x)}{a (c+d x)}\right )}{a^2 (n+1)} \]

[Out]

((b*c - a*d)*(a + b*x)^(1 + n)*(c + d*x)^(-1 - n)*Hypergeometric2F1[2, 1 + n, 2
+ n, (c*(a + b*x))/(a*(c + d*x))])/(a^2*(1 + n))

_______________________________________________________________________________________

Rubi [A]  time = 0.0548857, antiderivative size = 62, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.05 \[ \frac{(b c-a d) (a+b x)^{n+1} (c+d x)^{-n-1} \, _2F_1\left (2,n+1;n+2;\frac{c (a+b x)}{a (c+d x)}\right )}{a^2 (n+1)} \]

Antiderivative was successfully verified.

[In]  Int[(a + b*x)^n/(x^2*(c + d*x)^n),x]

[Out]

((b*c - a*d)*(a + b*x)^(1 + n)*(c + d*x)^(-1 - n)*Hypergeometric2F1[2, 1 + n, 2
+ n, (c*(a + b*x))/(a*(c + d*x))])/(a^2*(1 + n))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 6.09716, size = 48, normalized size = 0.77 \[ \frac{\left (a + b x\right )^{n - 1} \left (c + d x\right )^{- n + 1} \left (a d - b c\right ){{}_{2}F_{1}\left (\begin{matrix} - n + 1, 2 \\ - n + 2 \end{matrix}\middle |{\frac{a \left (c + d x\right )}{c \left (a + b x\right )}} \right )}}{c^{2} \left (- n + 1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((b*x+a)**n/x**2/((d*x+c)**n),x)

[Out]

(a + b*x)**(n - 1)*(c + d*x)**(-n + 1)*(a*d - b*c)*hyper((-n + 1, 2), (-n + 2,),
 a*(c + d*x)/(c*(a + b*x)))/(c**2*(-n + 1))

_______________________________________________________________________________________

Mathematica [C]  time = 0.299455, size = 141, normalized size = 2.27 \[ -\frac{2 b d (a+b x)^n (c+d x)^{-n} F_1\left (1;-n,n;2;-\frac{a}{b x},-\frac{c}{d x}\right )}{2 b d x F_1\left (1;-n,n;2;-\frac{a}{b x},-\frac{c}{d x}\right )+a d n F_1\left (2;1-n,n;3;-\frac{a}{b x},-\frac{c}{d x}\right )-b c n F_1\left (2;-n,n+1;3;-\frac{a}{b x},-\frac{c}{d x}\right )} \]

Warning: Unable to verify antiderivative.

[In]  Integrate[(a + b*x)^n/(x^2*(c + d*x)^n),x]

[Out]

(-2*b*d*(a + b*x)^n*AppellF1[1, -n, n, 2, -(a/(b*x)), -(c/(d*x))])/((c + d*x)^n*
(2*b*d*x*AppellF1[1, -n, n, 2, -(a/(b*x)), -(c/(d*x))] + a*d*n*AppellF1[2, 1 - n
, n, 3, -(a/(b*x)), -(c/(d*x))] - b*c*n*AppellF1[2, -n, 1 + n, 3, -(a/(b*x)), -(
c/(d*x))]))

_______________________________________________________________________________________

Maple [F]  time = 0.082, size = 0, normalized size = 0. \[ \int{\frac{ \left ( bx+a \right ) ^{n}}{{x}^{2} \left ( dx+c \right ) ^{n}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((b*x+a)^n/x^2/((d*x+c)^n),x)

[Out]

int((b*x+a)^n/x^2/((d*x+c)^n),x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (b x + a\right )}^{n}{\left (d x + c\right )}^{-n}}{x^{2}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x + a)^n/((d*x + c)^n*x^2),x, algorithm="maxima")

[Out]

integrate((b*x + a)^n*(d*x + c)^(-n)/x^2, x)

_______________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \[{\rm integral}\left (\frac{{\left (b x + a\right )}^{n}}{{\left (d x + c\right )}^{n} x^{2}}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x + a)^n/((d*x + c)^n*x^2),x, algorithm="fricas")

[Out]

integral((b*x + a)^n/((d*x + c)^n*x^2), x)

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x+a)**n/x**2/((d*x+c)**n),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (b x + a\right )}^{n}}{{\left (d x + c\right )}^{n} x^{2}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x + a)^n/((d*x + c)^n*x^2),x, algorithm="giac")

[Out]

integrate((b*x + a)^n/((d*x + c)^n*x^2), x)